import request from "@/utils/request";

export function getCmkAmtInfoList(query) {
  return request({
    url: "/admin/pncAmtInfo/list",
    method: "get",
    params: query
  });
}
export function getLastCmkAmtInfo() {
  return request({
    url: "/admin/pncAmtInfo/last",
    method: "get"
  });
}
export function updateInfo(data) {
  return request({
    url: "/admin/pncAmtInfo/updateInfo",
    method: "put",
    data: data
  });
}
export function getPondDetailList(query) {
  return request({
    url: "/admin/cmkAmtInfo/pond/list",
    method: "get",
    params: query
  });
}
export function getPondInfo() {
  return request({
    url: "/admin/cmkAmtInfo/pond",
    method: "get"
  });
}
export function addCmkAmt(data) {
  return request({
    url: "/admin/cmkAmtInfo/pond",
    method: "post",
    data: data
  });
}

export function getAmtOrderPage(query) {
  return request({
    url: "/admin/cmkAmtInfo/order/list",
    method: "get",
    params: query
  });
}
export function confirmOrder(orderId) {
  return request({
    url: "/admin/cmkAmtInfo/order/" + orderId,
    method: "put"
  });
}
export function cancelOrder(orderId) {
  return request({
    url: "/admin/cmkAmtInfo/order/" + orderId,
    method: "delete"
  });
}

// 举报列表
export function listReport(query) {
  return request({
    url: '/admin/cmkAmtInfo/report/list',
    method: 'get',
    params: query
  })
}

// 审核举报
export function updateReport(data) {
  return request({
    url: '/admin/cmkAmtInfo/report/audit',
    method: 'put',
    data: data
  })
}
// 解封
export function userUnForbidden(reportId) {
  return request({
    url: '/admin/cmkAmtInfo/report/userUnForbidden/' + reportId,
    method: 'put',
  })
}

export function getReportInfo(reportId) {
  return request({
    url: '/admin/cmkAmtInfo/report/' + reportId,
    method: 'get'
  })
}